import request from '@/utils/request'

const prePath = '/smartCabinet'
// 1.待处理出柜数据-列表
export function getSmartCabinetPendOutRecordCustomizeListPage(data) {
  return request({
    url: prePath + '/pendOutRecord/customizeList/page',
    method: 'post',
    data,
  })
}
// 1.待处理出柜数据-确认消耗
export function saveSmartCabinetPendOutRecordConsumeConfirm(data) {
  return request({
    url: prePath + '/comingOut/consumeConfirm',
    method: 'post',
    data,
  })
}
// 1.待处理出柜数据-移库
export function saveSmartCabinetPendOutRecordTransferDepot(data) {
  return request({
    url: prePath + '/comingOut/transferDepot',
    method: 'post',
    data,
  })
}
// 1.待处理出柜数据-采购退货
export function saveSmartCabinetPendOutRecordPurchReturn(data) {
  return request({
    url: prePath + '/comingOut/purchReturn',
    method: 'post',
    data,
  })
}
// 1.待处理出柜数据-报废
export function saveSmartCabinetPendOutRecordScrapExport(data) {
  return request({
    url: prePath + '/comingOut/scrapExport',
    method: 'post',
    data,
  })
}
// 1.待处理出柜数据-退回本仓库
export function saveSmartCabinetPendOutRecordReturnDepot(data) {
  return request({
    url: prePath + '/comingOut/returnDepot',
    method: 'post',
    data,
  })
}
// 1.待处理出柜数据-领用退回
export function saveSmartCabinetPendOutRecordUseReturnExport(data) {
  return request({
    url: prePath + '/comingOut/useReturnExport',
    method: 'post',
    data,
  })
}
// 2.智能柜柜存-列表
export function getSmartCabinetStockCustomizeListPage(data) {
  return request({
    url: prePath + '/stock/customizeList/page',
    method: 'post',
    data,
  })
}
// 2.智能柜柜存-个体详情
export function getSmartCabinetStockCustomizeListAll(data) {
  return request({
    url: prePath + '/stock/customizeList/all',
    method: 'post',
    data,
  })
}
// 3.智能柜存取记录-列表
export function getSmartCabinetAccessRecordCustomizeListPage(data) {
  return request({
    url: prePath + '/accessRecord/customizeList/page',
    method: 'post',
    data,
  })
}
// 3.智能柜存取记录-明细
export function getSmartCabinetAccessRecordDetailCustomizeListPage(data) {
  return request({
    url: prePath + '/accessRecordDetail/customizeList/page',
    method: 'post',
    data,
  })
}
// 3.智能柜存取记录-单号详情表单
export function getSmartCabinetAccessRecordDetail(id) {
  return request({
    url: prePath + '/accessRecord/' + id,
    method: 'get',
  })
}
// 3.智能柜存取记录-单号详情列表
export function getSmartCabinetAccessRecordDetailList(data) {
  return request({
    url: prePath + '/accessRecordDetail/getDetailList',
    method: 'post',
    data,
  })
}
//智能柜列表-新增
export function createSmartCabinet(data) {
  return request({
    url: prePath + '/list',
    method: 'post',
    data,
  })
}
export function getSmartCabinetCustomizeListPage(data) {
  return request({
    url: prePath + '/list/customizeList/page',
    method: 'post',
    data,
  })
}
//智能柜列表-修改
export function updateSmartCabinet(data) {
  return request({
    url: prePath + '/list/updateBindProduct',
    method: 'post',
    data,
  })
}
export function getSmartCabinetListById(id) {
  return request({
    url: prePath + '/list/' + id,
    method: 'get',
  })
}
//智能柜列表-删除
export function deleteSmartCabinet(data) {
  return request({
    url: prePath + '/list',
    method: 'delete',
    data,
  })
}
//智能柜列表-启用
export function enabledSmartCabinet(data) {
  return request({
    url: prePath + '/list/enabled',
    method: 'post',
    data,
  })
}
//智能柜列表-停用
export function disabledSmartCabinet(data) {
  return request({
    url: prePath + '/list/disabled',
    method: 'post',
    data,
  })
}
//智能柜绑定产品保存
export function bindProductSmartCabinet(data) {
  return request({
    url: prePath + '/product/bindProduct',
    method: 'post',
    data,
  })
}
export function deleteProductSmartCabinet(data) {
  return request({
    url: prePath + '/product',
    method: 'delete',
    data,
  })
}
export function getSmartCabinetProductCustomizeListPage(data) {
  return request({
    url: prePath + '/product/customizeList/page',
    method: 'post',
    data,
  })
}
export function getSmartCabinetProductAll(params) {
  return request({
    url: prePath + '/product/all',
    method: 'get',
    params,
  })
}
//--------------------标签绑定管理-----------开始
//通过自定义进行查询
export function getRfidBindCustomizeListPage(data) {
  return request({
    url: prePath + '/rfidBind/customizeList/page',
    method: 'post',
    data,
  })
}
//标签绑定-新增
export function createRfidBind(data) {
  return request({
    url: prePath + '/rfidBind',
    method: 'post',
    data,
  })
}
//标签绑定-新增多条
export function createRfidBindList(data) {
  return request({
    url: prePath + '/rfidBind/batchInsert',
    method: 'post',
    data,
  })
}
//标签绑定-新增保存
export function saveAndPrint(data) {
  return request({
    url: prePath + '/rfidBind/saveAndPrint',
    method: 'post',
    data,
  })
}
//标签绑定-选择打印
export function rfidBindPrint(data) {
  return request({
    url: prePath + '/rfidBind/print',
    method: 'post',
    data,
  })
}
//空白标签-打印
export function saveAndPrintZpl(data) {
  return request({
    url: prePath + '/blankLabel/saveAndPrintZpl',
    method: 'post',
    data,
  })
}
export function rfidBindUpdate(data) {
  return request({
    url: prePath + '/blankLabel/update',
    method: 'put',
    data,
  })
}
// 空白标签
export function getSmartCabinetBlankLabel(params) {
  return request({
    url: '/smartCabinet/blankLabel/page',
    method: 'get',
    params,
  })
}
// 空白标签
export function getStartNo() {
  return request({
    url: '/smartCabinet/blankLabel/getStartNo',
    method: 'get',
  })
}
//标签绑定-更新
export function updateRfidBind(data) {
  return request({
    url: prePath + '/rfidBind/updateBatchList',
    method: 'put',
    data,
  })
}
//标签绑定-删除
export function removeRfidBind(id) {
  return request({
    url: prePath + '/rfidBind/' + id,
    method: 'delete',
  })
}
//标签绑定-批量删除
export function removeRfidBindMore(data) {
  return request({
    url: prePath + '/rfidBind',
    method: 'delete',
    data,
  })
}
//获取生成收货单的发货单列表
export function searchNoBindDeliverOrderList(params) {
  return request({
    url: prePath + '/rfidBind/searchNoBindDeliverOrder',
    method: 'get',
    params,
  })
}
//获取生成入库单的入库单列表
export function searchNoBindReceivingOrderList(params) {
  return request({
    url: prePath + '/rfidBind/searchNoBindReceivingOrder',
    method: 'get',
    params,
  })
}
//标签绑定-未绑定rfid发货单明细
export function searchNoBindDeliverOrderDetailList(id) {
  return request({
    url: prePath + '/rfidBind/searchNoBindDeliverOrderDetail/' + id,
    method: 'get',
  })
}
//标签绑定-未绑定rfid入库单明细
export function searchNoBindReceivingOrderDetailList(id) {
  return request({
    url: prePath + '/rfidBind/searchNoBindReceivingOrderDetail/' + id,
    method: 'get',
  })
}
//标签绑定-自定义扫码
export function scansNoNeedDepot(data) {
  return request({
    url: '/stock/depotStock/scansNoNeedDepot',
    method: 'post',
    data,
  })
}
//标签绑定-自定义扫码
export function scansWithSmart(data) {
  return request({
    url: '/stock/depotStock/scansWithSmart',
    method: 'post',
    data,
  })
}
//标签绑定-推送数据
export function pushRfidBindInfo(id) {
  return request({
    url: prePath + '/rfidBind/pushRfidBindInfo/' + id,
    method: 'post',
  })
}
//账实不符
export function getStockInconformityCustomizeListPage(data) {
  return request({
    url: prePath + '/stockInconformity/customizeList/page',
    method: 'post',
    data,
  })
}
//账实不符-操作流水
export function getAffirListStockInconformity(rfidCode) {
  return request({
    url: prePath + '/stockInconformity/getAffirList/' + rfidCode,
    method: 'get',
  })
}
//智能柜状态监控
export function getStatusMonitorCustomizeListPage(data) {
  return request({
    url: prePath + '/statusMonitor/customizeList/page',
    method: 'post',
    data,
  })
}
//智能柜状态监控-刷新
export function refreshStatusMonitor(params) {
  return request({
    url: prePath + '/statusMonitor/refresh',
    method: 'get',
    params,
  })
}
//智能柜状态监控历史记录
export function getStatusMonitorHistoryCustomizeListPage(data) {
  return request({
    url: prePath + '/statusMonitorHistory/customizeList/page',
    method: 'post',
    data,
  })
}
//智能柜状态监控历史记录-删除
export function deleteStatusMonitorHistory(data) {
  return request({
    url: prePath + '/statusMonitorHistory',
    method: 'delete',
    data,
  })
}
//柜存预警
export function getStockWaringCustomizeListPage(data) {
  return request({
    url: prePath + '/stockWaring/customizeList/page',
    method: 'post',
    data,
  })
}
//产品效期预警
export function getStockCustomizeListPage(data) {
  return request({
    url: prePath + '/stock/customizeList/page',
    method: 'post',
    data,
  })
}
//柜存预警汇总
export function getStockWaringSummaryCustomizeListPage(data) {
  return request({
    url: prePath + '/stockWaringSummary/customizeList/page',
    method: 'post',
    data,
  })
}
//盘点差异
export function getDiffList(data) {
  return request({
    url: prePath + '/stockDiff/getDiffList',
    method: 'put',
    data,
  })
}
